﻿<?php
header("Content-type: text/html; charset=utf-8");
include_once("pkcs7/boc.class.php");
$pay = new boc("1111111a");
$pay->cert = dirname(__FILE__).'/pkcs7/cert/cert3.pem';
$pay->privateKey = dirname(__FILE__).'/pkcs7/cert/key3.pem';

if($_POST && $_POST['orderNos']) $orderNos = $_POST['orderNos'];
else $orderNos = "";

if($orderNos){
//签名数据格式
//orderNo|orderTime|curCode|orderAmount|merchantNo
date_default_timezone_set('PRC');
$timeso=date("YmdHis",time());
$unsignData = "23571|".$orderNos;
print "<b>未签名数据：".$unsignData."</b>";
$signData = $pay->signFromStr($unsignData);
?>
<FORM METHOD="POST" ACTION="https://ebspay.boc.cn/PGWPortal/CommonB2BQueryOrder.do">
<!--01.商户号-->
商户号：<INPUT TYPE="text" SIZE="25" ID="bocNo" NAME="bocNo" VALUE="23571"><BR/>
<!--03.商户订单号-->
商户订单号：<INPUT TYPE="text" SIZE="19" ID="orderNos" NAME="orderNos" VALUE="<?php echo $orderNos;?>"><BR/>


<!--09.商户签名数据-->
商户签名数据：<textarea ID="signData"  NAME="signData" cols=100 rows=12 ><?php echo $signData;?></textarea><BR/>
<input type="submit">
<BR/>
</FORM><br />
用户名：Cherry11   密码：ceshi333 
<?php
}else{
?>
<FORM METHOD="POST" ACTION="Recvsch.php">
<!--03.商户订单号-->
商户订单号：<INPUT TYPE="text" SIZE="19" ID="orderNos" NAME="orderNos" VALUE=""><BR/>
<input type="submit">
<BR/>
</FORM><br />
<?php
}
?>
